curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/firewall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"direction": "in",
"action": "accept",
"protocol": "tcp",
"priority": 5000,
"description": "<string>",
"source": "0.0.0.0/0",
"destination_port": "<string>"
}
'Create a new firewall rule for a compute instance. Rules can allow or deny traffic based on protocol, port, and source/destination IP addresses. The rule will not take effect until firewall rules are applied to the instance.
curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/firewall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"direction": "in",
"action": "accept",
"protocol": "tcp",
"priority": 5000,
"description": "<string>",
"source": "0.0.0.0/0",
"destination_port": "<string>"
}
'Documentation Index
Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
Use this file to discover all available pages before exploring further.
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Unique identifier of the compute instance.
Unique identifier of the organization that owns the resource.
Unique identifier of the project containing the resource.
255in - inout - outinbound - inboundoutbound - outboundin, out, inbound, outbound accept - acceptdrop - dropreject - rejectaccept, drop, reject tcp - tcpudp - udpicmp - icmpall - alltcp, udp, icmp, all 1 <= x <= 10000Firewall rule created successfully